﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using JLT.Countdown.Models;
using JLT.Countdown.Helpers;

namespace MvcApplication3.Controllers
{
    public class CountdownController : Controller
    {
        //
        // GET: /Countdown/

        public ActionResult Index()
        {
            return View();
        }

        //
        // GET: /Countdown/arrivals/id
        public ActionResult Arrivals(int id)
        {
            BusArrival b = new BusArrival();
            b.getData(id);
            return new XmlResult(b);
        }

        //
        // GET /Countdown/neareststops/lat,lon
        public ActionResult NearestStops(string latitude,string longitude)
        {
            BusStop b = new BusStop();
            return new XmlResult(b.getData(latitude,longitude),"");
        }

    }
}
